package com.service.impl;

import com.bean.ActivationRecord;
import com.dao.ActivationRecordMapper;
import com.service.ActivationRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("activationRecordService")
public class ActivationRecordServiceImpl implements ActivationRecordService {
    @Autowired
    private ActivationRecordMapper activationRecordMapper;
    @Override
    public int save(ActivationRecord activationRecord) {
        return activationRecordMapper.insert(activationRecord);
    }

    @Override
    public List<ActivationRecord> find(ActivationRecord activationRecord) {
        return activationRecordMapper.select(activationRecord);
    }

    @Override
    public int count(Map<String, Object> map) {
        return activationRecordMapper.selectCount(map);
    }

    @Override
    public List<ActivationRecord> query(Map<String, Object> map) {
        return activationRecordMapper.selectByPage(map);
    }
}
